﻿@{
    ViewBag.Title = "动力车间主要计划指标";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section scripts{
    <script src="~/Areas/Pacm/ViewModels/Pacm.Dljhzb.js"></script>
    <script type="text/javascript">
    using("lookup", easyuifix.datagrid_editor_extend); //动态载入这些组件
    using(['validatebox','combotree','numberbox'],easyuifix.datagrid_editor_extend);
   
    var data = @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model));
    ko.bindingViewModel(new viewModel(data));

    //格式化 显示部门名称
    com.formatUnit = function(value,row){return row.Dljhzb_Dwmc;};
    </script>
}
    <div class="z-toolbar">
        <a id="a_refresh" href="#" plain="true" class="easyui-linkbutton" icon="icon-arrow_refresh" title="刷新" data-bind="click:refreshClick">刷新</a>
        <a id="a_add"    href="#" plain="true" class="easyui-linkbutton" icon="icon-add" title="新增" data-bind="click:addClick">新增</a>
        <a id="a_edit"   href="#" plain="true" class="easyui-linkbutton" icon="icon-edit" data-bind="click:editClick" title="编辑">编辑</a>
        <a id="a_del"    href="#" plain="true" class="easyui-linkbutton" icon="icon-cross" title="删除" data-bind="click:deleteClick">删除</a>
        <a id="a_save"  href="#" plain="true" class="easyui-linkbutton" icon="icon-save" data-bind="click:saveClick" title="保存">保存</a>
        <a href="#" plain="true" class="easyui-linkbutton"  icon="icon-user-accept"     title="审核" data-bind="click:auditClick"  >审核</a>
    </div>
<div id="w"></div>
    <table id="gridlist" data-bind="treegrid:grid">
            <thead>  
            <tr>  
                <th field="Dljhzb_Dwmc" hidden="true" >部门名称</th>
                <th field="Dljhzb_BillNo"   editor="{type:'validatebox',options:{required: true }}" sortable="true" align="left"    width="100"   >单据编号</th> 
                <th field="Dljhzb_Year"     editor="{type:'validatebox',options:{required: true }}" sortable="true" align="left"    width="70"    >计划年度  </th>  
                <th field="Dljhzb_Month"    editor="{type:'validatebox',options:{required: true }}" sortable="true" align="left"    width="70"   >计划月份    </th>  
                <th field="Dljhzb_Dwid"     editor="{type:'lookup',options:{lookupType:'organize',parentField:'pid'}}" sortable="true" align="left"    width="160" formatter="com.formatUnit"  >计划单位   </th> 
                <th field="Dljhzb_Pjdlqd"   editor="{type:'numberbox',options:{precision:1}}" sortable="true" align="right"    width="200"   >月平均电流强度控制范围    </th>  
                <th field="Dljhzb_Zlxl"     editor="{type:'numberbox',options:{precision:1}}"  sortable="true" align="right"    width="70" >整流效率</th> 
                <th field="Dljhzb_Fykzfw"   editor="{type:'numberbox',options:{precision:1}}"  sortable="true" align="right"    width="70" >风压控制范围</th> 
                <th field="CreatePerson"    sortable="true" align="left"    width="80" >创建人</th> 
                <th field="CreateDate"      sortable="true"  formatter="com.formatDate" align="left"    width="100" >创建时间</th> 
                <th field="ApproveState"    sortable="true" align="left"    width="80" >审核状态</th> 
                <th field="ApproveDate"     sortable="true"  formatter="com.formatDate" align="left"    width="100" >审核时间</th> 
            </tr>   
        </thead>      
    </table> 
